package edu.bw.dao.impl;

import edu.bw.dao.AccountDao;
import edu.bw.po.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Repository
public class AccountDaoImpl implements AccountDao {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Override
    public void updateAccount(Account account) {
        jdbcTemplate.update("update account set money=money+? where name=?",account.getMoney(),account.getName());
    }
}
